/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 * @section DESCRIPTION
 *
 */

#ifndef __TSIN_LIBRARY_DYNAMICBASICTYPES_HPP__
#define __TSIN_LIBRARY_DYNAMICBASICTYPES_HPP__

#include <tsin/library/DynamicObject.hpp>

namespace tsin {

        class LIBRARY_DLLEXPORT DynamicBasicType : public DynamicObject {
        public:
                DynamicBasicType(int i);
                DynamicBasicType(float f);
                DynamicBasicType(bool b);
                DynamicBasicType(const char *s);

                virtual void reinit();

                virtual char getDescriptor();
                virtual int getInt();
                virtual float getFloat();
                virtual bool getBool();
                virtual const char *getString();

        private:
                char type;
                union {
                        int i;
                        float f;
                        bool b;
                        const char *s;
                } data;
        };

}

#endif /* __TSIN_LIBRARY_DYNAMICBASICTYPES_HPP__ */
